[#include "/WEB-INF/pages/common/taglibs.ftl"]
<div class="jqxExpander" id="configContent">
	<div>配置</div>
	<div>
		<a href="javascript:void(0);" id="createConfigItem" >新建站点配置</a>
		<a href="${action.backurl}" >返回</a>
		<form action="[@c.url value="/manage/Config_${act}.action"/]?backurl=${action.backurl}" method="post">
			<input type="hidden" name="id" value="${(config.id)!''}" />
			<table>
				<caption>配置的数据内容</caption>
					<tr>
						<th>名称：[#--[@fmt.message key="manage.config"/] --]</th>
						<td><input type="text" name="config.name" value="${(config.name)!''}" [#if act=='update']disabled[/#if]/></td>
						<td style="width:50px;"></td>
					</tr>
					<tr>
						<th>标题：[#--[@fmt.message key="manage.article.type"/]--]</th>
						<td><input type="text" placeholder="?" name="config.title" value="${(config.title)!''}"/></td>
						<td style="width:50px;"></td>
					</tr>	
					<tr>
						<th>可用：</th>
						<td>
							<label for="config_enabled_T" >可用  </label><input type="radio" id="config_enabled_T" name="config.enabled" value="true" [#if config == null || (config.enabled ==true)]checked[/#if]/>
							<label for="config_enabled_F" >禁用  </label><input type="radio" id="config_enabled_F" name="config.enabled" value="false" [#if (config != null && config.enabled == false)]checked[/#if]/>
						</td>
						<td style="width:50px;"></td>
					</tr>
					[#if (config.configItemList) ??]
						[#list config.configItemList as item]
						<tr class="config_item">
							<th>[${item_index + 1}]&nbsp;&nbsp;</th>
							<td colspan=2>
								<label>标题：</label><input style="width:80px;" name="config.configItemList[${item_index}].name" value="${item.name}" />
								<label>键名：</label><input style="width:80px;" name="config.configItemList[${item_index}].key" value="${item.key}" />
								<label>键值：</label><input style="width:80px;" name="config.configItemList[${item_index}].value" value="${item.value}" />
								<input type='button' class='item-delete' delId="${item.id}" value='删除' />
							</td>
						</tr>
						[/#list]
					[/#if]
					<tr id="addConfigItem">
						<th></th>
						<td style="float:right">
							<button>增加子项</button>
						</td>
						<td style="width:50px;"></td>
					</tr>
					<tr>
						<th></th>
						<td>
							[#if act=='save']
								<input type="submit" value="保存"/>
							[#else]
								<input type="submit" value="更新"/>
							[/#if]</td>
						<td style="width:50px;"></td>
					</tr>
			</table>
		</form> 
	</div>
</div>
